﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CommonFunc;
using DAL = AccessDAL;

public partial class Control_FileCenter : System.Web.UI.UserControl
{
    DAL.FileTableAdapters.FileTableAdapter DF =
        new DAL.FileTableAdapters.FileTableAdapter();

    AutoPage AP = new AutoPage();

    protected void Page_Load(object sender, EventArgs e)
    {
        ControlDataInit();
    }


    protected void ControlDataInit()
    {
        try
        {
            DataTable DT_FileCenter = DF.GetDataMain();

            AP.AutoPageInit(RPT_FileList1, DT_FileCenter, 12, LBtn_FirstPage, LBtn_PrePage, LBtn_NextPage,
                LBtn_LastPage, LB_PageIndex, LB_PageCount);

            if (!IsPostBack)
            {
                AP.RPTAutoPage(0);
            }
        }
        catch (Exception ex)
        {
            LB_FileCenter.Text = ex.Message;
        }
    }
}
